package org.jrm.mechanics;

public class Money {
	long moneyCount = 0;
	
	public Money() {
		this(1000);
	}
	
	public Money(long startCount) {
		moneyCount = startCount;
	}
	
	public long getMoneyCount() {
		return moneyCount;
	}
	
	public void incMoney(long count) {
		moneyCount += count;
	}
	
	public void decMoney(long count) {
		if (moneyCount < count) throw new IllegalArgumentException("Count " + String.valueOf(count) + "is too much");
		moneyCount -= count;
	}
}
